BeforeUrlRequestCallback

public interface BeforeUrlRequestCallback implements NetworkSyncCallback<P, R>

The callback is invoked when an HTTP request is about to occur.

The callback can be used to redirect the request to another location.

Use the redirect method to redirect the request to another location.

Use the proceed method if you do not need to redirect the location.

If the callback throws an exception, the proceed method will be invoked.

Types

Link copied to clipboard
public interface Params
The parameters of the BeforeUrlRequestCallback.
Link copied to clipboard
public interface Response
A response for BeforeUrlRequestCallback.

Functions

Link copied to clipboard
@CheckForNull()
public abstract R on(P params)
Invoked when the callback needs a response of type R that may be determined based on the provided callback parameters.